package com.zengqingfa.basic.entity;

import org.springframework.stereotype.Component;

/**
 * @fileName: Student
 * @author: zengqf3
 * @date: 2020-9-5 9:15
 * @description:
 */
@Component
public class Student extends People {

    private Integer age;

    public String name;

    public String sayHello(String name1, Integer age1) throws IllegalStateException {
        System.out.println("i am " + age1 + "and i am " + name1);
        return "say hello()";
    }

    public Student() {
    }

    private Student(Integer age) throws IllegalArgumentException {
        this.age = age;
    }

    public Student(Integer age, String name) {
        this.age = age;
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
